home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
FILES.SWG
/
0035_Hiding-Unhiding Files.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-02
|
718b
|
38 lines
{
Herbert Zarb <panther!jaguar!hzarb@relay.iunet.it>
This simple Program changes the attribute of the File or directory from
hidden to archive or vice-versa...
}
Program hide_unhide;
{ Accepts two command line parameters :
1st parameter can be either +h (hide) or -h(unhide).
2nd parameter must be the full path }
Uses
Dos;
Const
bell = #07;
hidden = $02;
archive = $20;
Var
f : File;
begin
if paramcount >= 2 then
begin
Assign(f, paramstr(2));
if paramstr(1) = '+h' then
SetFAttr(f, hidden)
else
if paramstr(1) = '-h' then
SetFAttr(f, Archive)
else
Write(bell);
end
else
Write(bell);
end.